﻿using PowerBooking.RSE.Poco;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Objects;
using System.Linq;
using System.Text;
using PowerBooking.RSE.IRepository;

namespace PowerBooking.RSE.Repository.Repositories
{
    /// <summary>
    /// 城市仓储
    /// </summary>
    public class CityRepository : RestaurantSpiderEngineRepository, ICityRepository
    {
        public CityRepository(IUnitOfWork unitOfWork) : base(unitOfWork) { }

        /// <summary>
        /// 插入一个城市
        /// </summary>
        /// <param name="cityPoco"></param>
        /// <returns></returns>
        public void InsertCity(CityPoco cityPoco)
        {
            Context.Cities.AddObject(cityPoco);
            Context.SaveChanges(SaveOptions.None);
        }
    }
}
